<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <noscript>
    <p>你的浏览器不支持js,最好升级一下</p>
  </noscript>
  <!-- 百度一下 -->
  <a href="https://www.baidu.com/" onclick="alert('点击百度一下')">百度一下</a><br>
  <a class="gg" href="#">我****</a>
  <a class="gg2" href="https://blog.csdn.net/weixin_48683052/article/details/121240929">好喜欢js</a>

  <script src="./do.js"></script>
  <script>
    const g1 = document.querySelector(".gg")
    g1.onclick = function () {
      alert("我****")
    }
  </script>
</body>

</html>